home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3h21.lha / 3.0h2update / Macros.LHA / FindOversetText.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-14  |  2KB  |  52 lines

  1. /* $VER: FindOverSetText.rexx 1.1 (13.9.95)
  2.    Copyright 1995 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. OPTIONS RESULTS
  6. ADDRESS 'PAGESTREAM'
  7.  
  8. iOversetCount = 0
  9.  
  10.  
  11. /* MAIN LOOP */
  12. call OPENLIBS()
  13.  
  14.     'getarticleids 'aArticles                            /* get a list of all articles */
  15.         aArticles.count = result
  16.  
  17.     do i = 0 to aArticles.count - 1                        /* repeat for each article */
  18.         'getarticleoverset articleid 'aArticles.i
  19.         if result = TRUE then LEAVE
  20.     end i
  21.  
  22.     if result = TRUE then do                            /* if an article is overset... */
  23.         getarticle frames aFrames articleid aArticles.i    /* get the frame's objectIDs for the article */
  24.         iLastFrame = aFrames.count - 1
  25.         getobject pagenumber sPageNum objectid aFrames.iLastFrame
  26.         display page sPageNum scale fullpage
  27.     end
  28.     else call doalert("No more overset text found!")
  29.     
  30. EXIT
  31.  
  32.  
  33. OPENLIBS:
  34.     /* OPEN LIBRARIES */
  35.     IF ~SHOW('L','rexxsupport.library') THEN
  36.         call addlib('rexxsupport.library',0,-30)
  37.     IF ~SHOW('L','softlogik:libs/slarexxsupport.library') THEN
  38.         call addlib("softlogik:libs/slarexxsupport.library", 0, -30)
  39. RETURN
  40.  
  41. DOALERT:
  42. parse arg sAlertText
  43. iAlertLength=length(sAlertText)
  44. /* Display an alert requester */
  45.     allocarexxrequester '"Macro Alert"' iAlertLength*8+24 55
  46.         hAlertReq=result
  47.     addarexxgadget hAlertReq TEXT 8 12 iAlertLength*8+8 border none string '"'sAlertText'"'
  48.     addarexxgadget hAlertReq EXIT iALertLength*8-58 38 70 label "_Exit"
  49.     doarexxrequester hAlertReq
  50.     freearexxrequester hAlertReq
  51. RETURN
  52.